<template>
  <view :style="themeColor">
    <view class="page">
      <fu-custom bgColor="bg-white" :isBack="true" :isBottom="true">
        <block slot="content">选择物流公司</block>
      </fu-custom>
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout chooseLogisticsCompany_flex_1">
        <benben-select-diy ref="showSelectPopup1657262172219" class-name='flex flex-direction align-stretch flex'
          :items.sync="dataList" v-model="logistics.logistics_id" :label.sync="logistics.logistics_name"
          @change="throwLogisticsFunc()" default-type="aid" default-label="name" :allow-cancel='true' type="radio"
          :disabled='false'>
          <template v-for='(item,key0) in dataList'>
            <view v-if="item.isSelected" class='flex align-center justify-between flex chooseLogisticsCompany_fd1_0_c0'
              :key="key0" @tap="$refs.showSelectPopup1657262172219.tapHandle(key0)">
              <text class='chooseLogisticsCompany_fd1_0_c0_c0'>{{item.name}}</text>
              <image class='chooseLogisticsCompany_fd1_0_c0_c1' mode="aspectFit" :src='STATIC_URL+"543.png"'></image>
            </view>
            <view v-else class='flex align-center justify-between flex chooseLogisticsCompany_fd1_0_c0' :key="key0"
              @tap="$refs.showSelectPopup1657262172219.tapHandle(key0)">
              <text class='chooseLogisticsCompany_fd1_0_c0_c0'>{{item.name}}</text>
              <image class='chooseLogisticsCompany_fd1_0_c0_c1' mode="aspectFit" :src='STATIC_URL+"135.png"'></image>
            </view>
          </template></benben-select-diy>
      </view>

      <!---flex布局flex布局结束-->


    </view>
  </view>
</template>
<script>
  import {
    validate
  } from '@/common/utils/validate.js'
  export default {
    components: {},


    data() {
      return {
        "logistics": {
          "logistics_id": "",
          "logistics_name": ""
        },
        "logistics_type": [{
          "name": "协作快递韵达",
          "value": "1",
          "image": ""
        }, {
          "name": "协作快递韵达",
          "value": "2",
          "image": ""
        }],
        "logistics_id": "1",
        "dataList": []
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {
      this.getLogisticsFunc()
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {
      this.getLogisticsFunc()
    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      //获取物流公司
      async getLogisticsFunc() {
        //请求方法
        //数据验证

        let datadataList = await this.$api.post(global.apiUrls.post6427e3a822643, {

        });

        if (datadataList.data.code != 1) {
          this.$message.info(datadataList.data.msg);
          return
        }
        let infodataList = datadataList.data;
        this.dataList = infodataList.data

      },
      //抛出
      throwLogisticsFunc() {
        uni.$emit('logistics', this.logistics)
        this.$urouter.navigateBack(1);
      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: #fff;
    background-size: 100% auto;
  }

  .chooseLogisticsCompany_flex_0 {
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .chooseLogisticsCompany_fd0_0_c2 {
    padding: 0rpx 0rpx 0rpx 0rpx;
    width: 200rpx;
  }

  .chooseLogisticsCompany_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 500;
    color: #333333;
  }

  .chooseLogisticsCompany_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
    font-weight: 500;
  }

  .chooseLogisticsCompany_fd0_0_c0 {
    width: 200rpx;
  }

  .chooseLogisticsCompany_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
    line-height: 88rpx;
  }

  .chooseLogisticsCompany_flex_1 {
    padding: 0rpx 24rpx 0rpx 24rpx;
  }

  .chooseLogisticsCompany_fd1_0_c0_c1 {
    width: 32rpx;
    height: 32rpx;
  }

  .chooseLogisticsCompany_fd1_0_c0_c0 {
    font-size: 32rpx;
    font-weight: 400;
    color: #111111;
  }

  .chooseLogisticsCompany_fd1_0_c0 {
    border-bottom: 1px solid #eee;
    padding: 32rpx 0rpx 32rpx 0rpx;
  }
</style>